package com.cqw.webauto.timer;

import com.cqw.webauto.rpc.WebAuto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
public class PublicTask {

    @Autowired
    WebAuto webAuto;

    Integer i = 0;
//    @Scheduled(fixedDelay  = 1000 * 60 * 6)
    @Scheduled(cron = "0 0 9 * * ?")
    public void testSend() {
        System.out.println("执行定时器！");
        if(i == 0){
            webAuto.cnblogsQQlogin();
            i++;
        }else{
            webAuto.cnblogsPublish();
        }

    }
}